<?php

namespace app\common\model;

use think\Model;

class Setting extends Model
{

    const table = 'setting';
    protected $type = [
        'content' => 'array'
    ];

    public function getOneSetting($key){
        $setting = $this->where(['key' => $key])->find();
        if($setting){
            return $setting['content'];
        }
        return false;
    }
}
